package com.kefu.robot.vo;

import org.apache.commons.lang3.StringUtils;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractSearchVo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author CodeGenerator
 * @date 2021/11/23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "转人工关键词")
public class RobotConnectRelSearchVo extends AbstractSearchVo {

    @ApiModelProperty(value = "转接提示内容")
    private String connectContent;


    public <T>QueryWrapper<T> builder() {
		QueryWrapper<T> wrapper=Wrappers.query();

	    if (StringUtils.isNotBlank(connectContent)) {
	        wrapper.like("connect_content", connectContent);
	    }
		wrapper.like("tenant_id", KefuContext.getTid());
	    return wrapper;
	}
}